import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;


public class ConnectMSSQL {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
			Connection connection = DriverManager
					.getConnection(
							"jdbc:sqlserver://wnv2ykm1he.database.windows.net:1433;database=HockeyDB;selectMethod=cursor",
							"HockeyDBConn@wnv2ykm1he", "password1.");

			System.out.println("DATABASE NAME IS:"
					+ connection.getMetaData().getDatabaseProductName());
			
		} catch (Exception e) {
			e.printStackTrace();
		}

	}
	
	


}
